public class 自定义泛型<T> {
    private T num;

    public T getNum() {
        return num;
    }

    public void setNum(T num) {
        this.num = num;
    }

    public static void main(String[] args) {
        自定义泛型<Integer> num = new 自定义泛型<>();
        num.setNum(10);
        System.out.println(num.getNum());
    }

}
